<%--
  Created by IntelliJ IDEA.
  User: YIMing
  Date: 2021/8/14/014
  Time: 17:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>申报课题-自主选题</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
    <script src="../js/jquery-3.1.0.js"></script>
    <style>

        body {
            background-color: #eeeeee;
        }

        .layui-row {
            padding: 10px;
            margin: 10px;
            background-color: white;
            border-radius: 5px;
        }

        .left {
            width: 20%;
            padding: 5px;
            text-align: right;
        }

        .right {
            width: 30%;
            padding: 5px;
        }

        .layui-table-cell {
            height: 36px;
            line-height: 36px;
        }

        .layui-textarea {
            height: 150px;
        }

        .detail-left {
            text-align: right;
        }


    </style>
</head>
<body>
<%--面包屑--%>
<div class="layui-row">
    <div class="layui-col-lg12">
        <span class="layui-badge layui-bg-orange" style="margin-bottom: -3px"></span>
        <span class="layui-breadcrumb">
                  <a href="http://localhost/student/home.jsp">首页</a>
                    <a class="" href="javascript:;">选题管理</a>
                    <a><cite>申报课题-自主选题</cite></a>
                </span>
    </div>
</div>

<%--课题信息表--%>
<div class="layui-row">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>申报课题-自主选题</legend>
    </fieldset>
    <button class="layui-btn layui-btn-normal layui-btn-radius" id="title-add-btn">
        开始申报课题
    </button>
    <table class="layui-hide" id="title-info" lay-filter="title-info"></table>
</div>
</body>
<%--自主申报课题盒子--%>
<div class="layui-row" id="add-box" style="display: none;margin-top: 20px;">
    <div class="layui-row">
        <form action="" class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">类型：<span class=" layui-badge-dot"></span></label>
                <div class=" layui-input-block">
                    <select class="layui-select" name="category" lay-verify="required">
                        <option value="">请选择：</option>
                        <option value="理工类">理工类</option>
                        <option value="文管类">文管类</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">课题标题:<span class=" layui-badge-dot"></span></label>
                <div class=" layui-input-block">
                    <input type="text" name="title" lay-verify="required" placeholder="请输入课题标题" class="layui-input"
                           style="border: #009f95 solid 1px">
                    <input type="hidden" name="college" value="" class="layui-input">
                    <input type="hidden" name="major" value="" class="layui-input">

                </div>
            </div>
            <div class=" layui-form-item">
                <label class="layui-form-label">题目来源：<span class=" layui-badge-dot"></span></label>
                <div class="layui-input-block" disabled="">
                    <input type="radio" name="from" value="自主选题" title="自主选题" checked>
                    <input type="radio" name="from" value="老师发布" title="老师发布" disabled>
                    <input type="radio" name="from" value="其他" title="其他" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">题目性质：<span class=" layui-badge-dot"></span></label>
                <div class="layui-input-block">
                    <input type="radio" name="nature" value="应用型" title="应用型" checked>
                    <input type="radio" name="nature" value="理论型" title="理论型">
                    <input type="radio" name="nature" value="研究型" title="研究型">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">选题简介：<span class=" layui-badge-dot"></span></label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" class="layui-textarea" name="taskText"
                              lay-verify="required"></textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <div style="float: right">
                    <%-- <button class="layui-btn" type="button" lay-submit lay-filter="save">保存</button>--%>
                    <button class="layui-btn" type="button" lay-submit lay-filter="save-and-submit">保存并提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>

<%--课题详情模板--%>
<div class="layui-row" id="task-detail" style="display: none">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <td colspan="4"><h2>学生申请课题详情内容</h2></td>
        </tr>
        </thead>
        <tbody id="task-detail-tbody">
        <tr>
            <td class="left">编号:</td>
            <td class="right" id="task-id"></td>
            <td class="left">申请时间</td>
            <td class="right" id="task-addtime"></td>
        </tr>
        <tr>
            <td class="left">学号:</td>
            <td class="right" id="task-no"></td>
            <td class="left">姓名:</td>
            <td class="right" id="task-sname"></td>
        </tr>
        <tr>
            <td class="left">指导老师</td>
            <td class="right" id="task-tname"></td>
            <td class="left">指导老师工号</td>
            <td class="right" id="task-tno"></td>

        </tr>
        <tr>
            <td class="left">所属学院:</td>
            <td class="right" id="task-college"></td>
            <td class="left">所属专业:</td>
            <td class="right" id="task-major"></td>
        </tr>
        <tr>
            <td class="left">标题:</td>
            <td class="right" id="task-title"></td>
            <td class="left">题目来源:</td>
            <td class="right" id="task-from"></td>
        </tr>
        <tr>
            <td class="left">题目类别:</td>
            <td class="right" id="task-category"></td>
            <td class="left">题目性质:</td>
            <td class="right" id="task-nature"></td>
        </tr>
        <tr>
            <td class="left">课题简介:</td>
            <td class="right" colspan="3" id="task-intr"></td>
        </tr>
        <tr>
            <td class="left">课题状态:</td>
            <td class="right" id="task-state"></td>
            <td class="left">是否通过:</td>
            <td class="right" id="task-isPass"></td>
        </tr>
        <tr>
            <td class="left">审核意见</td>
            <td class="right" id="task-opinion"></td>
        </tr>
        </tbody>
    </table>
</div>


<%--表内工具栏--%>
<script type="text/html" id="title-tool" style="display:none;">
    <%--<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">编辑</a>--%>
    <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="query">查看</a>
</script>

<%--状态栏样式--%>
<script type="text/html" id="stateTpl">
    {{#  if(d.state === '审核完成'){ }}
    <span class="layui-badge layui-bg-green">{{ d.state }}</span>
    {{#  } else if(d.state === '审核中'){ }}
    <span class="layui-badge layui-bg-orange">{{ d.state }}</span>
    {{# } }}
</script>
<script type="text/html" id="isPassTpl">
    {{#  if(d.isPass === '通过'){ }}
    <span class="layui-badge layui-bg-green">{{ d.isPass }}</span>
    {{#  } else if(d.isPass === '不通过'){ }}
    <span class="layui-badge " style="background-color: gray">{{ d.isPass }}</span>
    {{# }else{ }}
    <span class="layui-badge layui-bg-orange">{{ "审核中" }}</span>
    {{# } }}
</script>

<%--获取当前登录的session中的学号--%>
<script>
    let sno;
    $(function () {
        sno = '${sessionScope.userName}';
    });
</script>
<script src="js/titileInfo.js">
</script>
</html>